﻿namespace EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles
{
	public class Resources
	{
		public Resources(System.Configuration.ConfigurationSection section)
		{
			LoadConfig(section);
		}

		#region Properties
		/// Property ImageTelContainer: Get, Set
		public System.String ImageTelContainer { get; private set; }

		/// Property ImageHourglass: Get, Set
		public System.String ImageHourglass { get; private set; }

		/// Property ImagePieSliced: Get, Set
		public System.String ImagePieSliced { get; private set; }

		/// Property ImageRing: Get, Set
		public System.String ImageRing { get; private set; }
		#endregion

		#region Utilities
		/// LoadConfig
		private void LoadConfig(System.Configuration.ConfigurationSection section)
		{
			// check
			EFS.Common.Verify.Reference(section, "section");

			// get section
			System.Collections.Specialized.NameValueCollection nvc =
				(System.Collections.Specialized.NameValueCollection)System.Configuration.ConfigurationManager.GetSection(section.SectionInformation.SectionName);
			EFS.Common.Verify.Reference(nvc, section.SectionInformation.SectionName);

			// read
			ImageTelContainer = EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "ImageTelContainer");
			ImageHourglass = EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "ImageHourglass");
			ImagePieSliced = EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "ImagePieSliced");
			ImageRing = EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "ImageRing");
		}
		#endregion
	}

}